{% extends 'users/user_base.html' %}

{% block user_content %}

  <form id="signup-form" action="{% url 'user-signup' %}?{% if next %}&next={{ next }}{% endif %}{% if token %}&token={{ token }}{% endif %}" method="post">
    {% csrf_token %}
    <div>
      <input type="text" class="ls-input" name="email" id="email" placeholder="Email" value="{{ form.data.email }}">
      {% if user_form.errors.email %}
        <ul class="field_errors">
          {% for error in user_form.errors.email %}
            <li>{{ error }}</li>
          {% endfor %}
        </ul>
      {% endif %}
      </div>
    <div>
      <input type="password" class="ls-input" name="password" id="password" placeholder="Password">
      {% if user_form.errors.password %}
        <ul class="field_errors">
          {% for error in user_form.errors.password %}
            <li>{{ error }}</li>
          {% endfor %}
        </ul>
      {% endif %}
      </div>
    {% if form.non_field_errors %}
      {% for error in form.non_field_errors %}
        <p class="error">
          {{ error }}
        </p>
      {% endfor %}
    {% endif %}
    <p><button type="submit" aria-label="Create Account" class="ls-button ls-button_look_primary">Create Account</button></p>
  </form>

{% endblock %}
